<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Mold')}:</label>
        <div class="col-xs-12 col-sm-8">

            <div class="radio">
                {foreach name="moldList" item="vo"}
                <label for="row[mold]-{$key}"><input id="row[mold]-{$key}" name="row[mold]" type="radio" value="{$key}" {in name="key" value="1"}checked{/in} /> {$vo}</label>
                {/foreach}
            </div>

        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Temp_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-temp_name" data-rule="required" data-source="kzvote/temp/temp" class="form-control selectpage" data-field="title" data-primary-key="name" name="row[temp_name]" type="text" value="">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Music_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-music_id" data-source="kzvote/music/music/index" data-params='{"custom[status]":"10"}' class="form-control selectpage" name="row[music_id]" type="text" value="">
        </div>
    </div>


    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" data-rule="required" class="form-control" name="row[name]" type="text">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Image')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-image" data-rule="required" class="form-control" size="50" name="row[image]" type="text">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-image" class="btn btn-danger faupload" data-input-id="c-image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="false" data-preview-id="p-image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-image" class="btn btn-primary fachoose" data-input-id="c-image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-image"></span>
            </div>
            <div style="margin-top: 15px;color: #f00;">建议尺寸：300*240,可设置跳转链接</div>
            <ul class="row list-inline faupload-preview" id="p-image"></ul>
        </div>
    </div>
    {include file="kzvote/link/link" /}


    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Start_time')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-start_time" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[start_time]" type="text" value="{:date('Y-m-d H:i:s')}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('End_time')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-end_time" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[end_time]" type="text" value="{:date('Y-m-d H:i:s')}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Desc')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-desc" class="form-control editor" rows="5" name="row[desc]" cols="50"></textarea>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Prize')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-prize" class="form-control editor" rows="5" name="row[prize]" cols="50"></textarea>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Sponsor_name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-sponsor_name" class="form-control" name="row[sponsor_name]" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Sponsor_mobile')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-sponsor_mobile" class="form-control" name="row[sponsor_mobile]" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Limit_count')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-limit_count" data-rule="required" class="form-control" name="row[limit_count]" type="number" value="0">
                <div class="input-group-addon">0为不限制</div>
            </div>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Day_limit_count')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-day_limit_count" data-rule="required" class="form-control" name="row[day_limit_count]" type="number" value="1">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Btn_txt')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-btn_txt" class="form-control" name="row[btn_txt]" type="text" value="投票">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Day_limit_status')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-day_limit_status" name="row[day_limit_status]" type="hidden" value="0">
            <a href="javascript:;" data-toggle="switcher" class="btn-switcher" data-input-id="c-day_limit_status"
               data-yes="1" data-no="0">
                <i class="fa fa-toggle-on text-success fa-flip-horizontal text-gray fa-2x"></i>
            </a>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Verify_status')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-verify_status" name="row[verify_status]" type="hidden" value="0">
            <a href="javascript:;" data-toggle="switcher" class="btn-switcher" data-input-id="c-verify_status"
               data-yes="1" data-no="0">
                <i class="fa fa-toggle-on text-success fa-flip-horizontal text-gray fa-2x"></i>
            </a>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Gift_status')}:</label>
        <div class="col-xs-12 col-sm-8">

            <input id="c-gift_status" name="row[gift_status]" type="hidden" value="0">
            <a href="javascript:;" data-toggle="switcher" class="btn-switcher" data-input-id="c-gift_status"
               data-yes="1" data-no="0">
                <i class="fa fa-toggle-on text-success fa-flip-horizontal text-gray fa-2x"></i>
            </a>

        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Group_status')}:</label>
        <div class="col-xs-12 col-sm-8">

            <input id="c-group_status" name="row[group_status]" type="hidden" value="0">
            <a href="javascript:;" data-toggle="switcher" class="btn-switcher" data-input-id="c-group_status" data-yes="1"
               data-no="0">
                <i class="fa fa-toggle-on text-success fa-flip-horizontal text-gray fa-2x"></i>
            </a>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Is_open')}:</label>
        <div class="col-xs-12 col-sm-8">

            <input id="c-is_open" name="row[is_open]" type="hidden" value="1">
            <a href="javascript:;" data-toggle="switcher" class="btn-switcher" data-input-id="c-is_open" data-yes="1"
               data-no="0">
                <i class="fa fa-toggle-on text-success fa-2x"></i>
            </a>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Review_status')}:</label>
        <div class="col-xs-12 col-sm-8">

            <input id="c-review_status" name="row[review_status]" type="hidden" value="1">
            <a href="javascript:;" data-toggle="switcher" class="btn-switcher" data-input-id="c-review_status" data-yes="1"
               data-no="0">
                <i class="fa fa-toggle-on text-success fa-2x"></i>
            </a>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-status" name="row[status]" type="hidden" value="10">
            <a href="javascript:;" data-toggle="switcher" class="btn-switcher" data-input-id="c-status" data-yes="10"
               data-no="20">
                <i class="fa fa-toggle-on text-success fa-2x"></i>
            </a>
        </div>
    </div>

    <!--报名设置-->
    <div class="panel panel-default">
        <div class="panel-heading">报名设置</div>
        <div class="panel-body">
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2">{:__('Apply_status')}:</label>
                <div class="col-xs-12 col-sm-8">
                    <input id="c-apply_status" name="row[apply_status]" type="hidden" value="0">
                    <a href="javascript:;" data-toggle="switcher" class="btn-switcher" data-input-id="c-apply_status"
                       data-yes="1" data-no="0">
                        <i class="fa fa-toggle-on text-success fa-flip-horizontal text-gray fa-2x"></i>
                    </a>
                </div>
            </div>

            <div data-favisible="apply_status=1">
                <div class="form-group">
                    <label class="control-label col-xs-12 col-sm-2">{:__('Apply_check')}:</label>
                    <div class="col-xs-12 col-sm-8">
                        <input id="c-apply_check" name="row[apply_check]" type="hidden" value="0">
                        <a href="javascript:;" data-toggle="switcher" class="btn-switcher" data-input-id="c-apply_check"
                           data-yes="1" data-no="0">
                            <i class="fa fa-toggle-on text-success fa-flip-horizontal text-gray fa-2x"></i>
                        </a>
                    </div>
                </div>
                <div class="form-group">
                    <label class="control-label col-xs-12 col-sm-2">{:__('end_apply_status')}:</label>
                    <div class="col-xs-12 col-sm-8">
                        <input id="c-end_apply_status" name="row[end_apply_status]" type="hidden" value="1">
                        <a href="javascript:;" data-toggle="switcher" class="btn-switcher"
                           data-input-id="c-end_apply_status" data-yes="1" data-no="0">
                            <i class="fa fa-toggle-on text-success fa-2x"></i>
                        </a>
                    </div>
                </div>

                <div class="form-group" data-favisible="end_apply_status=0">
                    <label class="control-label col-xs-12 col-sm-2">{:__('Apply_start_time')}:</label>
                    <div class="col-xs-12 col-sm-8">
                        <input id="c-apply_start_time" class="form-control datetimepicker"
                               data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[apply_start_time]"
                               type="text"
                               value="{:date('Y-m-d H:i:s')}">
                    </div>
                </div>
                <div class="form-group" data-favisible="end_apply_status=0">
                    <label class="control-label col-xs-12 col-sm-2">{:__('Apply_end_time')}:</label>
                    <div class="col-xs-12 col-sm-8">
                        <input id="c-apply_end_time" class="form-control datetimepicker"
                               data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[apply_end_time]"
                               type="text"
                               value="{:date('Y-m-d H:i:s')}">
                    </div>
                </div>
                <div class="form-group">
                    <label class="control-label col-xs-12 col-sm-2">{:__('报名选项')}:</label>
                    <div class="col-xs-12 col-sm-8">
                        <input data-source="kzvote/option/index" class="form-control selectpage" data-page-size="20" data-multiple="true" name="row[option]"
                               data-primary-key="name" type="text">
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!--报名设置-->


    <div class="panel panel-default">
        <div class="panel-heading">流量主设置</div>
        <div class="panel-body">
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2">{:__('Shield_status')}:</label>
                <div class="col-xs-12 col-sm-8">
                    <input id="c-shield_status" name="row[shield_status]" type="hidden" value="0">
                    <a href="javascript:;" data-toggle="switcher" class="btn-switcher" data-input-id="c-shield_status"
                       data-yes="1" data-no="0">
                        <i class="fa fa-toggle-on text-success fa-flip-horizontal text-gray fa-2x"></i>
                    </a>
                </div>
            </div>

            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2">{:__('Award_status')}:</label>
                <div class="col-xs-12 col-sm-8">
                    <input id="c-award_status" name="row[award_status]" type="hidden" value="0">
                    <a href="javascript:;" data-toggle="switcher" class="btn-switcher" data-input-id="c-award_status"
                       data-yes="1" data-no="0">
                        <i class="fa fa-toggle-on text-success fa-flip-horizontal text-gray fa-2x"></i>
                    </a>
                </div>
            </div>

            <div data-favisible="award_status=1">
                <div class="form-group">
                    <label class="control-label col-xs-12 col-sm-2">{:__('Award_btn_name')}:</label>
                    <div class="col-xs-12 col-sm-8">
                        <input id="c-award_btn_name" class="form-control" name="row[award_btn_name]" type="text"
                               value="看视频+票数">
                    </div>
                </div>

                <div class="form-group">
                    <label class="control-label col-xs-12 col-sm-2">{:__('Award_num')}:</label>
                    <div class="col-xs-12 col-sm-8">
                        <input id="c-award_num" class="form-control" name="row[award_num]" type="number" value="1">
                    </div>
                </div>

                <div class="form-group">
                    <label class="control-label col-xs-12 col-sm-2">{:__('Award_msg')}:</label>
                    <div class="col-xs-12 col-sm-8">
                        <input id="c-award_msg" class="form-control" name="row[award_msg]" type="text"
                               value="观看广告，奖励选手票数">
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div class="panel panel-default">
        <div class="panel-heading">加粉设置</div>
        <div class="panel-body">

            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2">{:__('Fans_status')}:</label>
                <div class="col-xs-12 col-sm-8">
                    <input id="c-fans_status" name="row[fans_status]" type="hidden" value="0">
                    <a href="javascript:;" data-toggle="switcher" class="btn-switcher" data-input-id="c-fans_status"
                       data-yes="1" data-no="0">
                        <i class="fa fa-toggle-on text-success fa-flip-horizontal text-gray fa-2x"></i>
                    </a>
                </div>
            </div>

            <div data-favisible="fans_status=1">
                <div>
                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2">{:__('Mold')}:</label>
                        <div class="col-xs-12 col-sm-8">
                            <div class="radio">
                                <label for="row[fans_desc][type]-1"><input id="row[fans_desc][type]-1" name="row[fans_desc][type]" type="radio" value="1" checked onchange="$('#qr').show();$('#xcx').hide();"/>公众号</label>
                                <label for="row[fans_desc][type]-2"><input id="row[fans_desc][type]-2" name="row[fans_desc][type]" type="radio" value="2" onchange="$('#qr').show();$('#xcx').hide();"/>微信号</label>
                                <label for="row[fans_desc][type]-3"><input id="row[fans_desc][type]-3" name="row[fans_desc][type]" type="radio" value="3" onchange="$('#qr').show();$('#xcx').hide();"/>微信群</label>
                                <label for="row[fans_desc][type]-4"><input id="row[fans_desc][type]-4" name="row[fans_desc][type]" type="radio" value="4" onchange="$('#qr').hide();$('#xcx').show();"/>小程序</label>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="form-group">
                    <label class="control-label col-xs-12 col-sm-2">名称:</label>
                    <div class="col-xs-12 col-sm-8">
                        <input class="form-control" name="row[fans_desc][name]" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="control-label col-xs-12 col-sm-2">头像:</label>
                    <div class="col-xs-12 col-sm-8">
                        <div class="input-group">
                            <input id="c-fans_desc_avatar" class="form-control" size="50" name="row[fans_desc][avatar]" type="text">
                            <div class="input-group-addon no-border no-padding">
                                <span><button type="button" id="faupload-fans_desc_avatar" class="btn btn-danger faupload" data-input-id="c-fans_desc_avatar" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="false" data-preview-id="p-fans_desc_avatar"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                                <span><button type="button" id="fachoose-fans_desc_avatar" class="btn btn-primary fachoose" data-input-id="c-fans_desc_avatar" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                            </div>
                            <span class="msg-box n-right" for="c-fans_desc_avatar"></span>
                        </div>
                        <ul class="row list-inline faupload-preview" id="p-fans_desc_avatar"></ul>
                    </div>
                </div>
                <div class="form-group" id="qr">
                    <label class="control-label col-xs-12 col-sm-2">二维码:</label>
                    <div class="col-xs-12 col-sm-8">
                        <div class="input-group">
                            <input id="c-fans_desc_qr" class="form-control" size="50" name="row[fans_desc][qr]" type="text">
                            <div class="input-group-addon no-border no-padding">
                                <span><button type="button" id="faupload-fans_desc_qr" class="btn btn-danger faupload" data-input-id="c-fans_desc_qr" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="false" data-preview-id="p-fans_desc_qr"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                                <span><button type="button" id="fachoose-fans_desc_qr" class="btn btn-primary fachoose" data-input-id="c-fans_desc_qr" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                            </div>
                            <span class="msg-box n-right" for="c-fans_desc_qr"></span>
                        </div>
                        <ul class="row list-inline faupload-preview" id="p-fans_desc_qr"></ul>
                    </div>
                </div>
                <div id="xcx" style="display:none;">
                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2">小程序appid:</label>
                        <div class="col-xs-12 col-sm-8">
                            <input class="form-control" name="row[fans_desc][appid]" type="text">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2">小程序路径:</label>
                        <div class="col-xs-12 col-sm-8">
                            <input class="form-control" name="row[fans_desc][path]" type="text">
                        </div>
                    </div>
                </div>
            </div>

        </div>
    </div>

    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
